Release 10.1A: OpenEdge Development:
Programming Interfaces
Comparing MEMPTR and RAW data types
Progress provides two data types to store data in a raw (binary) form,
MEMPTRandRAW.MEMPTRandRAWdata types provide similar features, but serve different purposes, as follows:
- You can use both
MEMPTRandRAWvariables to store binary data that originates with any other data type in the 4GL or that you import from another environment using an EPI.- You can use
MEMPTRvariables to directly exchange data between the 4GL and a supported EPI environment; you can useRAWvariables only to exchange data with another 4GL data type, includingMEMPTR.- You can define
RAWfields in an OpenEdge database, but you cannot defineMEMPTRfields. You can move database fields and records to and fromMEMPTRvariables usingRAWvariables as intermediate storage.In sum, the
RAWdata type supports the storage and movement of binary data within the local 4GL and OpenEdge database environment, while theMEMPTRdata type supports the storage and movement of data between the local 4GL and external 4GL or non-4GL environments.You can also assign values between
Note: In previous versions of Progress, assignment from oneMEMPTRandRAWvariables directly using the 4GL assignment operator (=). If the target variable isRAW, Progress resizes the target, if necessary, to make it the same size as the source. For both assignment betweenMEMPTRandRAWvariables and assignment between two variables of the same data type, the source and the target variables maintain separate and complete copies of the data.MEMPTRvariable to another created a copy of the pointer, not the data. Thus, both variables referred to the same data after the assignment. With Version 9.1, each variable refers to a completely separate copy of the data. However, passing aMEMPTRparameter to a local procedure remains pass by reference, andMEMPTRparameters to a remote procedure are passed by value, as with assignment statements.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |